package com.zy.explore.design.patterns.templatemethod;

import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Component
public class MerchantB extends AbstractMerchantService{
    /**
     * Http是否走代理（提供给子类实现）
     *
     * @return boolean
     */
    @Override
    boolean isRequestByProxy() {
        return false;
    }

    public HttpServletResponse handle(HttpServletRequest request, HttpServletResponse response) {
        System.out.println("商户B执行模板方法流程");
        return handleTemplate(request, response);
    }
}
